Constructing Customized Interpreters from Reusable Evaluators Using Game
نویسندگان
چکیده
Separation of concerns is difficult to achieve in the implementation of a programming language interpreter. We argue that evaluator concerns (i.e., those implementing the operational semantics of the language) are, in particular, difficult to separate from the runtime concerns (e.g., memory and stack management) that support them. This precludes the former from being reused and limits variability in the latter. In this paper, we present the Game environment for composing customized interpreters from a reusable evaluator and different variants of its supporting runtime. To this end, Game offers a language for specifying the evaluator according to the generic programming methodology. Through a transformation into defunctionalized monadic style, the Game toolchain generates a generic abstract machine in which the sequencing of low-level interpretational steps is parameterized. Given a suitable instantiation of these parameters for a particular runtime, the toolchain is able to inject the runtime into the generic abstract machine such that a complete interpreter is generated. To validate our approach, we port the prototypical Scheme evaluator to Game and compose the resulting generic abstract machine with several runtimes that vary in their automatic memory management as well as their stack discipline.
منابع مشابه
Using Overloading to Express Distinctions Between Evaluators
Evaluators, also called \interpreters", play a variety of roles in the study of programming languages. Given this, it's surprising that we don't have a better framework for developing evaluators and specifying their relationship to each other. This paper shows that type classes in HASKELL provide an excellent framework for exploring relationships between evaluators, using abstract interpretatio...
متن کاملUsing Overloading to Express Distinctions Between Evaluators 1
Evaluators, also called \interpreters", play a variety of roles in the study of programming languages. Given this, it's surprising that we don't have a better framework for developing evaluators and specifying their relationship to each other. This paper shows that type classes in HASKELL provide an excellent framework for exploring relationships between evaluators, using abstract interpretatio...
متن کاملA Domain Oriented Approach for Network Software Requirement Modeling
Requirement analysis on NS (network software) poses a lot of problems for the reason of dynamic deploying topology, dynamic proposing and dynamic changing of requirement. In this paper, we propose a unified solution for NS requirement modeling called PVSS. The purpose of PVSS is to provide a stepwise modeling framework on extracting common artifacts of families of NS applications from domain on...
متن کاملModular interpreters with implicit context propagation
Modular interpreters are a crucial first step towards component-based language development: instead of writing language interpreters from scratch, they can be assembled from reusable, semantic building blocks. Unfortunately, traditional language interpreters can be hard to extend because different language constructs may require different interpreter signatures. For instance, arithmetic interpr...
متن کاملTrends in Specialization of Interpreters using Offline Narrowing-Driven Partial Evaluation
The search of compilation by specialization of interpreters is a source to source program transformation which has inspired the work of scientists in partial evaluation from many years ago. Narrowing-driven Partial Evaluation (NPE) is a powerful technique for the specialization of functional logic programs. Recent advances in research of offline NPE schemes allow us to develop partial evaluator...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2012